package com.zatech.cgnci.project.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.zatech.cgnci.project.dto.CgnciClaimSettlementQueryDTO;
import com.zatech.cgnci.project.entity.CgnciClaimSettlementDO;
import com.zatech.cgnci.project.vo.CgnciClaimSettlementPageVO;
import com.zatech.cgnci.project.vo.CgnciClaimSettlementVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 分入结算记录表 Mapper 接口
 * </p>
 */
@Mapper
public interface CgnciClaimSettlementMapper extends BaseMapper<CgnciClaimSettlementDO> {

    /**
     * 分页查询结算列表
     */
    Page<CgnciClaimSettlementPageVO> pageClaimSettlement(Page page, @Param("query") CgnciClaimSettlementQueryDTO queryDTO);

    /**
     * 获取结算汇总信息
     */
    List<CgnciClaimSettlementVO.SettlementSummaryVO> getSettlementSummary(@Param("settlementId") Long settlementId);

    String selectMaxSettlementNo(@Param("caseNo") String caseNo, @Param("settlementType") String settlementType);

    CgnciClaimSettlementDO selectMaxSettlement(@Param("taskNo") String taskNo);

    void updateTaskNo(@Param("caseNo") String caseNo);
}
